package come.myStudy;

public class Puppy {
	static int puppyAge;
	public Puppy(String name) {
		System.out.println("小狗的名字叫"+name);
	}
	public int getPuppyAge() {
		System.out.println("小狗的年龄为 : " + puppyAge ); 
		return puppyAge;
	}
	public void setPuppyAge(int puppyAge) {
		this.puppyAge = puppyAge;
	}
	public static void main(String[] args) {
		Puppy pipi = new Puppy("pipi");
		pipi.setPuppyAge(2);
		pipi.getPuppyAge();
		System.out.println("小狗的年龄为 : " + Puppy.puppyAge);
	}
	
}
